home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shw_opening.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  136 lines

  1. # Jones 3D Cog Script
  2. #
  3. # CYN_opening.cog
  4. #
  5. #    [cmg]
  6. #
  7. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13.     message     startup
  14.     
  15.     
  16.     # Actors
  17.     thing        player                    local
  18.     thing    indyActor
  19.  
  20.     # Props
  21.     thing    door0
  22.     thing    door1
  23.     
  24.     # Actor move targets
  25.     thing    in_mvtarg0
  26.  
  27.  
  28.     # sectors
  29.     sector    doorSector    local
  30.  
  31.  
  32.     # Camera objects
  33.     thing    openCam1
  34.     
  35.     
  36.     # saylines
  37.     sound       indyline=sw01j01.wav         local       # brrrr...
  38.     sound        music0=mus_shw_intro.wav    local
  39.     # keyframes
  40.     keyframe    in_brushoff=0in_cleanspants_1_1.key        local
  41.     keyframe    in_hat=0in_figithat_4_4.key        local
  42.     keyframe    in_brush=0in_stand1_bd_4.key        local
  43.     keyframe    in_stand4=0in_stand4.key        local
  44.  
  45.  
  46.     int         inmarcus=0
  47.     int         track                local
  48.     int         snd                    local
  49.     int        curCam                    local
  50.  
  51.     
  52. end
  53.  
  54. # ========================================================================================
  55.  
  56. code
  57.  
  58. startup:
  59. if (inmarcus == 1) return;
  60. else
  61.     {
  62.     Sleep(0.01);
  63.     curCam = GetCurrentCamera();
  64.     player = GetLocalPlayerThing();
  65.     
  66.     # hide the player, show the actor
  67.     SetThingFlags(player, 0x80000);
  68.     SetActorFlags(player, 0x200000);
  69.     
  70.     # SET UP THE ACTOR WITH CORRECT WEAPONS
  71.     CopyPlayerHolsters(player, indyActor);
  72.     ClearThingFlags(indyActor, 0x80000);
  73.     StartCutscene(2);
  74.     
  75.     # setup cutscene camera
  76.     SetCameraFocus(2, openCam1);
  77.     SetCameraSecondaryFocus(2, indyActor);
  78.     SetCameraPosInterp(2, 0);                
  79.     SetCameraLookInterp(2, 0);                #default
  80.     SetCurrentCamera(2);
  81.     SetCameraFOV(120, 0, 0);    
  82.     MoveToFrame(openCam1, 1, 0.75);
  83.     SetCameraFOV(60, 1, 8.5);
  84.     
  85.     #play the intro theme
  86.     PlaySoundLocal(music0, 1.0, 0.0, 0x0, 0);
  87.     Sleep(2.0);
  88.  
  89.     # open the doors
  90.     Rotate(door0, 90, 1, 4);
  91.     Rotate(door1, -90, 1, 4);
  92.     Sleep(1.5);
  93.     
  94.     # move the actor through the doorway
  95.     AISetLookThingEyeLevel(indyActor, in_mvtarg0);
  96.     AISetMoveSpeed(indyActor, 1.0);
  97.     AISetMoveThing(indyActor, in_mvtarg0, 0);
  98.     
  99.     
  100.     Sleep(3.5);
  101.     
  102.     Rotate(door0, -90, 1, 3);
  103.     Rotate(door1, 90, 1, 3);
  104.     AIWaitForStop(indyActor);
  105.         track = PlayKey(indyActor, in_Stand4, 2, 0x0, 0);
  106.     #PlayKey(indyActor, in_1to4, 4, 0x12, 1);
  107.     PlayKey(indyActor, in_hat, 4, 0x12, 0);
  108.     Sleep(0.75);
  109.     snd = PlayVoice(indyActor, indyline, 1.0, 0);
  110.     StopKey(indyActor, track, 0.5);
  111.  
  112.     # when line finishes restore player control
  113.     WaitForSound(snd);
  114.     Sleep(0.25);
  115.  
  116.     # move player to indyActors' position and restore player
  117.     CopyOrientAndPos(indyActor, player);
  118.     ClearThingFlags(player, 0x80000);
  119.     ClearActorFlags(player, 0x200000);
  120.     SetThingFlags(indyActor, 0x80000);
  121.     AIClearCutSceneMode(indyActor);
  122.     # Restore camera, end cutscene
  123.     ResetCameraFOV(0,0);
  124.     SetCameraPosition(1, (GetThingPos(openCam1))); # prep follow-cam to swing behind indy
  125.     SetCurrentCamera(curCam);
  126.     SetCameraFOV(90, 0, 0.0);
  127.     
  128.     doorSector = GetThingSector(door0);
  129.     SetSectorAdjoins(doorSector, 0);
  130.     EndCutscene();
  131.     }
  132.     return;
  133.  
  134. end
  135.  
  136.